package jannex.sql;

import java.util.Arrays;

public class JxBatchUpdateException extends JxSqlException {

    private final int[] updateCounts;

    public JxBatchUpdateException(String message, Throwable cause, int vendorCode, String sqlState, int[] updateCounts) {
        super(message, cause, vendorCode, sqlState);
        this.updateCounts = (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length);
    }

    public int[] getUpdateCounts() {
        return (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length);
    }
}
